<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/view/layouts/base.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML>
<html>
<head>
<title>更新商品信息</title>
<link rel="stylesheet" href="${ctxsta}/common/icheck/flat/green.css" />
<link rel="stylesheet"
	href="${ctxsta}/common/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="${ctxsta}/common/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="${ctxsta}/cms/css/animate.css" />
<link rel="stylesheet" href="${ctxsta}/cms/css/style.css" />
<script src="${ctxsta}/common/jquery/jquery-3.2.0.min.js"></script>
<script src="${ctxsta}/common/bootstrap/js/bootstrap.min.js"></script>
<script src="${ctxsta}/common/metismenu/metisMenu.min.js"></script>
<script src="${ctxsta}/common/slimscroll/jquery.slimscroll.min.js"></script>
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>
							更新商品信息<small> 商品信息时应当遵循合法、正当、必要的原则，明示目的、方式和范围。</small>
						</h5>
						<div class="ibox-tools">
							<a class="collapse-link"><i class="fa fa-chevron-up"></i></a> <a
								class="close-link"><i class="fa fa-times"></i></a>
						</div>
					</div>
					<div class="ibox-content">
						<form id="form" class="form-horizontal" enctype="multipart/form-data" data-method="put">
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">商品图片:</label>
								<div class="col-sm-6">									
										<img id="img1" data-value="${productinfo.picImg}" name="picimg" src="${ctxsta}/${productinfo.picImg}" style="width:90px;height:90px;">
                                        <input id="file1" url="${productinfo.picImg}"  type="file" />
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">商品编号:</label>
								<div class="col-sm-6">
									<input type="text" readonly="readonly" class="form-control"
										id="productNumber" name="productNumber" value="${productinfo.productNumber}">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">标签名称：</label>
								<div class="col-sm-6">
									<label class="radio-inline"> <input type="radio"
										name="label.labelId" value="1" ${productinfo.getLabel().getLabelId() eq '1'?'checked="checked"':''}>
										热销
									</label> <label class="radio-inline"> <input type="radio"
										name="label.labelId" value="2" ${productinfo.getLabel().getLabelId() eq '2'?'checked="checked"':''}>
										新品
									</label> <label class="radio-inline"> <input type="radio"
										name="label.labelId" value="3" ${productinfo.getLabel().getLabelId() eq '3'?'checked="checked"':''}>
										现货
									</label>
									<label class="radio-inline"> <input type="radio"
										name="label.labelId" value="4" ${productinfo.getLabel().getLabelId()eq '4'?'checked="checked"':''}>
										有赠品
									</label>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">商品名称：</label>
								<div class="col-sm-6">
									<input type="text" maxlength="11" class="form-control"
										id="name" name="name" value="${productinfo.name}">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">显示价积分：</label>
								<div class="col-sm-6">
									<input type="text" maxlength="11" class="form-control"
										id="showScore" name="showScore" value="${productinfo.showScore}">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">显示价格：</label>
								<div class="col-sm-6">
									<input type="text" maxlength="11" class="form-control"
										id="showPrice" name="showPrice" value="${productinfo.showPrice}">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">产品简介：</label>
								<div class="col-sm-6">
									<input type="text"  class="form-control"
										id="introduce" name="introduce" value="${productinfo.introduce}">
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">是否置顶：</label>
								<div class="col-sm-6">
									<label class="radio-inline"> <input type="radio"
										name="showInTop" value="1" ${productinfo.showInTop eq '1'?'checked="checked"':''}>
										是
									</label>
									<label class="radio-inline"> <input type="radio"
										name="showInTop" value="0" ${productinfo.showInTop eq '0'?'checked="checked"':''}>
										否
									</label>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">是否导航栏：</label>
								<div class="col-sm-6">
									<label class="radio-inline"> <input type="radio"
										name="showInNav" value="1" ${productinfo.showInNav eq '1'?'checked="checked"':''}>
										是
									</label>
									<label class="radio-inline"> <input type="radio"
										name="showInNav" value="0" ${productinfo.showInNav eq '0'?'checked="checked"':''}>
										否
									</label>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">是否热门：</label>
								<div class="col-sm-6">
									<label class="radio-inline"> <input type="radio"
										name="showInHot" value="1" ${productinfo.showInHot eq '1'?'checked="checked"':''}>
										是
									</label>
									<label class="radio-inline"> <input type="radio"
										name="showInHot" value="0" ${productinfo.showInHot eq '0'?'checked="checked"':''}>
										否
									</label>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 col-xs-offset-1 control-label">是否上架：</label>
								<div class="col-sm-6">
									<label class="radio-inline"> <input type="radio"
										name="showInShelve" value="1" ${productinfo.showInShelve eq '1'?'checked="checked"':''}>
										上架
									</label>
									<label class="radio-inline"> <input type="radio"
										name="showInShelve" value="0" ${productinfo.showInShelve eq '0'?'checked="checked"':''}>
										下架
									</label>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<div class="col-sm-12 text-center">
									<button class="btn btn-success" onclick="save_productinfo();" type="submit">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<myfooter> <!-- iCheck --> <script
		src="${ctxsta}/common/icheck/icheck.min.js"></script> <!-- bootstrapvalidator-master前端验证框架 -->
	<script
		src="${ctxsta}/common/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
	<!-- 自定义js --> <script src="${ctxsta}/cms/js/update os_product.js"></script> </myfooter>
</body>
</html>
